home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 6871 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  858 b 

  1. Path: rahul.net!a2i!news
  2. From: terris@rahul.net (Terris Linenbach)
  3. Newsgroups: comp.lang.c++
  4. Subject: STL fix for vectors-in-vectors
  5. Date: 20 Feb 1996 06:00:57 GMT
  6. Organization: a2i network
  7. Message-ID: <4gbo2p$i49@hustle.rahul.net>
  8. NNTP-Posting-Host: 534.rahul.net
  9. Mime-Version: 1.0
  10. Content-Type: Text/Plain; charset=US-ASCII
  11. X-Newsreader: WinVN 0.99.6
  12.  
  13. Here is your work-around.  Supply the constructor arguments:
  14.  
  15.   std::vector< std::vector<int> > a( 0, std::vector<int>() );
  16.  
  17. This is ugly.  This seems to be yet another problem related to putting
  18. STL in the std namespace.
  19.  
  20. Do the same thing for deques.
  21.  
  22. Thank you,
  23. Terris
  24.  
  25. >>The only problem i have is with 2-dim arrays like:
  26. >>std::vector< std::vector<int> > a;
  27. >>I get error messages if i include a line like the above one
  28. >>in my code (i don't remember the exact error-messages).
  29. >>bye
  30. >>
  31. >>  Dieter
  32.  
  33.